1. How many comparisons will it take when searching for 9?
2. How many comparisons will it take when searching for 8?
3. How many comparisons will it take when searching for 15?
4. How many comparisons will it take when searching for -3?
Binary Search:
Use the following array for questions 5-8.
-1
3
4
7
10
13
14
18
21
32
5. How many comparisons will it take when searching for -1?
6. How many comparisons will it take when searching for 7?
7. How many comparisons will it take when searching for 32?
8. How many comparisons will it take when searching for 14?
Use the following array for questions 1-4.
2. How many comparisons will it take when searching for 8?
3. How many comparisons will it take when searching for 15?
4. How many comparisons will it take when searching for -3?
Binary Search:
Use the following array for questions 5-8.
6. How many comparisons will it take when searching for 7?
7. How many comparisons will it take when searching for 32?
8. How many comparisons will it take when searching for 14?
Answers:
1. 3
2. 9
3. 5
4. 1
5. 3
6. 4
7. 4
8. 4